import request from '@/utils/request'

// 查询点餐信息列表
export function listDishesOrder(query) {
  return request({
    url: '/rms/dishesOrder/list',
    method: 'get',
    params: query
  })
}

// 查询点餐信息详细
export function getDishesOrder(orderId) {
  return request({
    url: '/rms/dishesOrder/' + orderId,
    method: 'get'
  })
}

// 新增点餐信息
export function addDishesOrder(data) {
  return request({
    url: '/rms/dishesOrder',
    method: 'post',
    data: data
  })
}

// 修改点餐信息
export function updateDishesOrder(data) {
  return request({
    url: '/rms/dishesOrder',
    method: 'put',
    data: data
  })
}

// 删除点餐信息
export function delDishesOrder(orderId) {
  return request({
    url: '/rms/dishesOrder/' + orderId,
    method: 'delete'
  })
}

// 根据订单查询点餐信息
export function getDishesByOrderId(orderId) {
  return request({
    url: '/rms/dishesOrder/selectDishesByOrderId/' + orderId,
    method: 'get'
  })
}
